<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/admin.css" media="all">
    <link rel="stylesheet" href="/static/admin/theme/css/console.css" media="all">
</head>
<body>



<form method="get" team="{:url('/admin/goods')}" class="layui-form layui-card-header layuiadmin-card-header-auto">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">账户</label>
            <div class="layui-input-block">
                <select name="account_id" style="width:100%">
                    <option value="">--请选择状态--</option>
                    {foreach name="ads" item="vo"}
                    <option {if condition="$Request.get.account_id eq $vo['id']"} selected{/if} value="{$vo.id}">{$vo.account_id}</option>
                    {/foreach}
                </select>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">时间</label>
            <div class="layui-input-inline">
                <input type="text" id="start_time" name="start_time" value="{$Request.get.start_time}" class="layui-input" placeholder="开始时间" style="" autocomplete="off">
            </div>
            <div class="layui-input-inline">
                <input type="text" id="end_time" name="end_time" value="{$Request.get.end_time}" class="layui-input" placeholder="结束时间" style="" autocomplete="off">
            </div>
        </div>

        <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin mmm" lay-submit lay-filter="LAY-user-front-search">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
        </div>

    </div>
</form>

<div class="think-box-shadow portal-block-container notselect">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm6 layui-col-md3" >
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#57bdbf,#2f9de2)">
                <div>今日注册用户</div>
                <div>{$today_register|default='0'}</div>
               
            </div>
            <i class="portal-block-icon layui-icon layui-icon-list"></i>
        </div>
        <div class="layui-col-sm6 layui-col-md3" >
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#e91dab,#ffd026)" >
                <div>今日消费金额用户</div>
                <div>{$today_new_consume|default='0'}</div>
                
            </div>
            <i class="portal-block-icon layui-icon layui-icon-list"></i>
        </div>
        <div class="layui-col-sm6 layui-col-md3" >
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#ff7d7d,#fb2c95)" >
                <div>当日消费总金额</div>
                <div>{$today_comsume|default='0'}</div>
               
            </div>
            <i class="portal-block-icon layui-icon layui-icon-list"></i>
        </div>
        <div class="layui-col-sm6 layui-col-md3" >
            <div class="portal-block-item nowrap" style="background:linear-gradient(-125deg,#999,#999)" onclick="ads()">
                <div>总消费金额</div>
                <div>{$ad_total|default='0'}</div>
                <div>总消费金额(点击出详情)</div>
            </div>
            <i class="portal-block-icon layui-icon layui-icon-list"></i>
        </div>
    </div>
   
</div>

<script src="/static/admin/layui/layui.all.js"></script>
<script>
    function goodsorder(){
        layer.open({
            type: 2,
            title: '盲盒订单',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/winning_record?type=1' //iframe的url
        });
    }
    function productorder(){
        layer.open({
            type: 2,
            title: '盲盒订单',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/productorder' //iframe的url
        });
    }

    function opened_box(){
        layer.open({
            type: 2,
            title: '已开盲盒',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/opened_box' //iframe的url
        });
    }

    function box(){
        layer.open({
            type: 2,
            title: '未开盲盒',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/box' //iframe的url
        });
    }
    function ads(){
        layer.open({
            type: 2,
            title: '广告位',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/ads' //iframe的url
        });
    }
    function newUser(){
        layer.open({
            type: 2,
            title: '新用户',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/newUser' //iframe的url
        });
    }
    function new_consume(){
        layer.open({
            type: 2,
            title: '新用户消费',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/new_consume' //iframe的url
        });
    }

    function total_consume(){
        layer.open({
            type: 2,
            title: '当日消费总金额',
            shadeClose: true,
            shade: 0.8,
            area: ['80%', '80%'],
            content: '/admin/total_consume' //iframe的url
        });
    }
</script>
<div class="layui-fluid">
</div>
</body>
</html>


<script type="text/javascript">
    layui.use(['table','laydate','form'], function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#start_time' //指定元素
            ,type : 'date'
            ,trigger : 'click'
        });
        laydate.render({
            elem: '#end_time' //指定元素
            ,type : 'date'
            ,trigger : 'click'
        });
        var form = layui.form;
        form.on('switch(isValid)',function (data){
            console.log(data)
        })
    });
</script>